/**
 *
 *  @author ala
 *  @date 2024-09-20 17:55
 */
package dto

import "fmt"

/********************************************************************************
 *	常量相关
 ********************************************************************************/
type SEX int

const (
	Man SEX = iota
	Woman
)

/********************************************************************************
 *	基类相关
 ********************************************************************************/
type Person interface {
	SayHi()
	SayBye()
	IncrmentAge(y int)
	AIncrmentAge(y int)
	Show()
}

/********************************************************************************
 *	学生相关
 ********************************************************************************/
type Student struct {
	Person
	Name string
	Age  int
	Sex  SEX
}

func (s *Student) SayHi() {
	fmt.Printf("%s: Say Hi student \n", s.Name)
}
func (s *Student) SayBye() {
	fmt.Printf("%s: Say Bye student \n", s.Name)
}
func (s *Student) IncrmentAge(y int) {
	s.Age += y
}
func (s *Student) Show() {
	fmt.Printf("name:%s, age:%d, sex:%s \n", s.Name, s.Age, s.Sex)
}

/********************************************************************************
 *	教师相关
 ********************************************************************************/
type Teacher struct {
	Person
	Name string
	Age  int
	Sex  SEX
}

func (t *Teacher) SayHi() {
	fmt.Printf("%s: Say Hi Teacher \n", t.Name)
}
func (t *Teacher) SayBye() {
	fmt.Printf("%s Say Byt Teacher \n", t.Name)
}
func (t *Teacher) IncrmentAge(y int) {
	t.Age += y
}
func (t *Teacher) Show() {
	fmt.Printf("name:%s, age:%d, sex:%s \n", t.Name, t.Age, t.Sex)
}
